package com.edgclub.edg.api.param;

import android.text.TextUtils;

import com.edgclub.edg.http.param.Params;
import com.edgclub.edg.utils.util.CryptUtil;

import java.util.TreeMap;

public class RechargeParam extends Params {

	private String userId;
	private String channel;
	private String money;
	private String buyOrderCode;
	private String phone;
	private String verifyCode;
	private String pwd;
	private String newPwd;

	private String target;
	private String page;
	private String pageSize;

	private String title;
	private String total;//红包个数
	private String payPwd;//支付密码
	private String redId;

	private String userType;

	private String type;
	private String toUserId;

	private String accId;
	private String accType;
	private String name;
	private String amount;
	private String uid;
	private String redType;

	@Override
	public TreeMap<String, String> getParams() {
		params = simpleParams();
		if (null != uid && !TextUtils.isEmpty(uid)) {
			params.put("uid", uid);
		}
		if (null != amount && !TextUtils.isEmpty(amount)) {
			params.put("amount", amount);
		}
		if (null != name && !TextUtils.isEmpty(name)) {
			params.put("name", name);
		}
		if (null != accType && !TextUtils.isEmpty(accType)) {
			params.put("accType", accType);
		}
		if (null != accId && !TextUtils.isEmpty(accId)) {
			params.put("accId", accId);
		}
		if (null != newPwd && !TextUtils.isEmpty(newPwd)) {
			params.put("newPwd", CryptUtil.md5(CryptUtil.md5(newPwd)));
		}
		if (null != phone && !TextUtils.isEmpty(phone)) {
			params.put("phone", phone);
		}
		if (null != verifyCode && !TextUtils.isEmpty(verifyCode)) {
			params.put("verifyCode", verifyCode);
		}

		if (null != pwd && !TextUtils.isEmpty(pwd)) {
			params.put("pwd", CryptUtil.md5(CryptUtil.md5(pwd)));
		}
		if (null != userId && !TextUtils.isEmpty(userId)) {
			params.put("userId", userId);
		}

		if (null != channel && !TextUtils.isEmpty(channel)) {
			params.put("channel", channel);
		}

		if (null != money && !TextUtils.isEmpty(money)) {
			params.put("money", money);
		}

		if (null != buyOrderCode && !TextUtils.isEmpty(buyOrderCode)) {
			params.put("buyOrderCode", buyOrderCode);
		}
		if (null != total && !TextUtils.isEmpty(total)) {
			params.put("total", total);
		}
		if (null != title && !TextUtils.isEmpty(title)) {
			params.put("title", title);
		}
		if (null != payPwd && !TextUtils.isEmpty(payPwd)) {
			params.put("payPwd", CryptUtil.md5(CryptUtil.md5(payPwd)));
		}
		if (null != redId && !TextUtils.isEmpty(redId)) {
			params.put("redId", redId);
		}

		if (null != target && !TextUtils.isEmpty(target)) {
			params.put("target", target);
		}

		if (null != page && !TextUtils.isEmpty(page)) {
			params.put("page", page);
		}
		if (null != pageSize && !TextUtils.isEmpty(pageSize)) {
			params.put("pageSize", pageSize);
		}

		if (null != userType && !TextUtils.isEmpty(userType)) {
			params.put("userType", userType);
		}

		if (null != toUserId && !TextUtils.isEmpty(toUserId)) {
			params.put("toUserId", toUserId);
		}

		if (null != type && !TextUtils.isEmpty(type)) {
			params.put("type", type);
		}

		if (null != redType && !TextUtils.isEmpty(redType)) {
			params.put("redType", redType);
		}

		params.put("sign", CryptUtil.md5(convertParamCharge()));

		return params;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAccType() {
		return accType;
	}

	public void setAccType(String accType) {
		this.accType = accType;
	}

	public String getAccId() {
		return accId;
	}

	public void setAccId(String accId) {
		this.accId = accId;
	}

	public String getNewPwd() {
		return newPwd;
	}

	public void setNewPwd(String newPwd) {
		this.newPwd = newPwd;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getVerifyCode() {
		return verifyCode;
	}

	public void setVerifyCode(String verifyCode) {
		this.verifyCode = verifyCode;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	public String getBuyOrderCode() {
		return buyOrderCode;
	}

	public void setBuyOrderCode(String buyOrderCode) {
		this.buyOrderCode = buyOrderCode;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTotal() {
		return total;
	}

	public void setTotal(String total) {
		this.total = total;
	}

	public String getRedId() {
		return redId;
	}

	public void setRedId(String redId) {
		this.redId = redId;
	}

	public String getPayPwd() {
		return payPwd;
	}

	public void setPayPwd(String payPwd) {
		this.payPwd = payPwd;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getPageSize() {
		return pageSize;
	}

	public void setPageSize(String pageSize) {
		this.pageSize = pageSize;
	}

	public String getToUserId() {
		return toUserId;
	}

	public void setToUserId(String toUserId) {
		this.toUserId = toUserId;
	}

	public String getRedType() {
		return redType;
	}

	public void setRedType(String redType) {
		this.redType = redType;
	}
}
